#include <iostream>
#include <GLFW/glfw3.h>
#include <webgpu/webgpu.h>
#include <webgpu/wgpu.h>
int main() {
    std::cout << "Hello, World!" << std::endl;

    WGPUInstanceDescriptor desc = {};
    desc.nextInChain = nullptr;

    WGPUInstance instance = wgpuCreateInstance(&desc);
    if(!instance){
        printf("Could not create instance \n");
    }
    wgpuInstanceDrop(instance);


    if(!glfwInit()){
        printf("Could not initialize glfw \n");
        return 1;
    }
    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
    glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);

    GLFWwindow* window = glfwCreateWindow(640, 480, "Learn WebGPU", NULL, NULL);
    if(!window){
        printf("Could not open window \n");
        return 1;
    }

    while (!glfwWindowShouldClose(window)){
        glfwPollEvents();
    }

    glfwDestroyWindow(window);
    glfwTerminate();

    return 0;
}
